<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      let str = `18028765589`;

      // /^(?:(?:\+|00)86)?1(?:(?:3[\d])|(?:4[5-79])|(?:5[0-35-9])|(?:6[5-7])|(?:7[0-8])|(?:8[\d])|(?:9[1589]))\d{8}$/

      // /^(?:(?:\+|00)86)?1[3-9]\d{9}$/;

      // 验证手机格式的合法性
      console.log(/^1[3-9]\d{9}$/.test(str));

      // console.log(/^18028765567$/.test(str));
      // console.log(/^\d{11}$/.test(str));
    </script>
  </body>
</html>
